<template>
    <div class="btn">
        <van-button :block="block" :type="type" :native-type="nativeType" :to="to" class="my-button" @click="cli">
            <slot></slot>
        </van-button>
    </div>
</template>

<script lang="ts" setup>
    import {  } from 'vue';
    withDefaults(defineProps<{
        type?: any,
        block?: boolean,
        nativeType?: any,
        to?: string,
    }>(), {
        type: 'primary',
        block: true,
        nativeType: 'button',
    })
    const emits = defineEmits<{
        (e: 'click'): void
    }>()
    const cli = () => {
        emits('click')
    }
</script>

<style lang="scss" scoped>
    .btn {
        width: 100%;
        height: 50px;
        .my-button {
            @include button-1-global;
        }
        
    }
</style>